package com.lcf.framework.enums;

/**
 * redis缓存前缀
 *
 * @author ruoyi
 */
public enum RedisCachePrefixEnum {
    //菜单树
    MENU_TREE("menu_tree"),
    //租户菜单树
    TENANT_MENU_TREE("tenant_menu_tree"),
    //用户-角色
    USER_ROLE("user_role"),
    //角色-权限
    ROLE_PERMISSION("role_permission"),
    //用户-菜单
    USER_MENU("user_menu"),
    //租户邀请记录
    TENANT_INVITE("tenant_invite"),
    //邮箱绑定验证码
    EMAIL_BIND_CODE("email_bind_code"),
    //手机绑定验证码
    PHONE_BIND_CODE("phone_bind_code"),
    //用户-角色id
    USER_ROLE_ID("user_role_id"),
    ;

    private final String name;

    RedisCachePrefixEnum(String name) {
        this.name = name;
    }

    public String getKey(Object key) {
        return this.name + ":" + key;
    }

    public String getKey() {
        return this.name;
    }
}
